<include file="Public:head" title="{$menu.name}"/>

<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <include file="Public:left" />
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="__APP__/{$Think.MODULE_NAME}">首页</a></li>
                    <li>任务管理</li>
                    <li class="active">{$menu.name}</li>
                </ul>
            </div>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">
                                <h3 class="header smaller lighter blue">添加任务</h3>

                                <form action="/Tian/Taskwork/edittask" method="POST" id="form" novalidate="novalidate">
                                    <table class="table table_detail">
                                        <tbody>
                                        <tr>
                                            <td class="td_left">任务名称:</td>
                                            <td>
                                                <input name="task_name" type="text" id="task_name"  class="common_txt" placeholder="请输入任务名称" value="{$taskdetails.task_name}">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="td_left">订单编号:</td>
                                            <td>
                                                <input name="order_no" type="text" id="order_no" class="common_txt" placeholder="请输入订单编号" value="{$taskdetails.order_no}">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="td_left">商品id:</td>
                                            <td>
                                                <input name="goods_id" type="text" id="goods_id" class="common_txt" placeholder="请输入商品id" value="{$taskdetails.goods_id}">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="td_left">qq:</td>
                                            <td>
                                                <input name="qq" type="text" id="qq" class="common_txt" placeholder="请输入客户的qq" value="{$taskdetails.qq}">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="td_left">手机:</td>
                                            <td>
                                                <input name="mobile" type="text" id="mobile" class="common_txt" placeholder="请输入客户的手机号" value="{$taskdetails.mobile}">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="td_left">任务描述</td>
                                            <td>
                                                <textarea class="common_txt" style="height: 200px;width:400px" name="task_content" placeholder="请输入任务描述" id="task_content" autocomplete="off">{$taskdetails.task_content}</textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="td_left">进度描述</td>
                                            <td>
                                                <textarea class="common_txt" style="height: 200px;width:400px" name="tracking_description" placeholder="请输入进度描述" id="tracking_description" autocomplete="off">{$taskdetails.tracking_description}</textarea>
                                            </td>
                                        </tr>
                                        <tr id="tr_name">
                                            <td class="td_left"> 任务状态:</td>
                                            <td>
                                                <select name="status" id="status" autocomplete="off" style="width:120px;">
                                                    <foreach name="adminstatus" item="vo" key="k" >
                                                        <option value="{$vo.id}" <if condition="$taskdetails.status eq $vo.id "> selected</if> >{$vo.name}</option>
                                                    </foreach>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr id="tr_name">
                                            <td class="td_left"> 指派给:</td>
                                            <td>
                                                <select name="assign_uid" id="assign_uid" autocomplete="off" style="width:120px;">
                                                    <foreach name="adminlist" item="vo" key="k" >
                                                        <option value="{$vo.id}" <if condition="$taskdetails.assign_uid eq $vo.id "> selected</if> >{$vo.nickname}</option>
                                                    </foreach>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="td_left"></td>
                                            <td>
                                                <input type="hidden" name="id"  value="{$taskdetails.id}">
                                                <button class="btn btn-info btn-sm" onclick="subform()" type="button">
                                                    <i class="icon-ok bigger-110 "></i>
                                                    保 存
                                                </button>

                                                <button class="btn btn-sm reset" type="button" onclick="goUrl(-1)">
                                                    <i class="icon-undo bigger-110"></i>
                                                    返 回
                                                </button>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <style>
        .widget-body{
            height: 500px;
        }
    </style>
    <script type="text/javascript" src="/Public/plugins/layer/layer.js"></script>
    <script type="text/javascript">

        function subform() {
            var task_name = $("#task_name").val();
            var order_no = $("#order_no").val();
            var status = $("#status").val();
            var assign_uid = $("#assign_uid").val();
            if(task_name == ""){
                layer.tips('任务名称不能为空', '#task_name');
                return false;
            }
            if(order_no == ""){
                layer.tips('订单编号不能为空', '#order_no');
                return false;
            }

            $("#form").submit();
        }
    </script>
    <!--    本月-->

</div>
<include file="Public:foot" />
<include file="Public:date_range" />
<include file="Public:fusioncharts" />

